package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.api.domain.SysUser;
import com.ruoyi.system.domain.DfAppUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DfAppMapper;
import com.ruoyi.system.domain.DfApp;
import com.ruoyi.system.service.IDfAppService;

/**
 * 应用Service业务层处理
 *
 * @author wangsr
 * @date 2022-01-13
 */
@Service
public class DfAppServiceImpl implements IDfAppService {
    @Autowired
    private DfAppMapper dfAppMapper;

    /**
     * 查询应用
     *
     * @param appId 应用主键
     * @return 应用
     */
    @Override
    public DfApp selectDfAppByAppId(Long appId) {
        return dfAppMapper.selectDfAppByAppId(appId);
    }

    /**
     * 查询应用列表
     *
     * @param dfApp 应用
     * @return 应用
     */
    @Override
    public List<DfApp> selectDfAppList(DfApp dfApp) {
        return dfAppMapper.selectDfAppList(dfApp);
    }

    /**
     * 新增应用
     *
     * @param dfApp 应用
     * @return 结果
     */
    @Override
    public int insertDfApp(DfApp dfApp) {
        return dfAppMapper.insertDfApp(dfApp);
    }

    /**
     * 修改应用
     *
     * @param dfApp 应用
     * @return 结果
     */
    @Override
    public int updateDfApp(DfApp dfApp) {
        return dfAppMapper.updateDfApp(dfApp);
    }

    /**
     * 批量删除应用
     *
     * @param appIds 需要删除的应用主键
     * @return 结果
     */
    @Override
    public int deleteDfAppByAppIds(Long[] appIds) {
        return dfAppMapper.deleteDfAppByAppIds(appIds);
    }

    /**
     * 删除应用信息
     *
     * @param appId 应用主键
     * @return 结果
     */
    @Override
    public int deleteDfAppByAppId(Long appId) {
        return dfAppMapper.deleteDfAppByAppId(appId);
    }

    @Override
    public List<SysUser> selectDfAppUserByAppId(Long appId) {
        return dfAppMapper.selectDfAppUserByAppId(appId);
    }

    @Override
    public List<SysUser> selectUnallocatedList(DfAppUser dfApp) {
        return dfAppMapper.selectUnallocatedList(dfApp);
    }
}
